import {useSearchParams} from "react-router-dom";

const Login = () => {
    // 获取search传入的参数
    const [params] = useSearchParams();
    const name = params.get("name");
    const age = params.get("age");
    return (
        <div>
            <h2>我是登录页面</h2>
            <h3>name:{name}</h3>
            <h3>age:{age}</h3>
        </div>
    )
}

export default Login
